package com.zzw.thread.safe;

/**
 * @author zzw
 * @see
 * @since 2018/3/30
 */
public class CounterClient implements Runnable {

    private Counter c;
    private int num;

    public CounterClient(Counter c,int num){
        this.c = c;
        this.num = num;
    }

    @Override
    public void run() {
        for (int i = 0;i < num;i++){
            c.increment();
        }
    }
}
